import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Mueble here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Mueble extends Otros
{
    
    private int contenido;
    private int ima;
    /**
     * Act - do whatever the Mueble wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    
    public Mueble(int c,int im)
    {
      contenido=c;
      ima=im;
      if(ima==0)
        setImage("sillon.png");
      if(ima==1)
        setImage("lampa.png");
    }
    
    public void act() 
    {
         if(ima==1){
          if(isTouching(Cartman.class)){
              if(Greenfoot.isKeyDown("enter"))
               setRotation(45);
            
            }
        }    
     }
}
